home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / apps / database / postgres / postgre4.z / postgre4 / newconf / newfiles.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  1992-08-27  |  968 b   |  73 lines

  1. #!/bin/sh
  2. #
  3. #    newfiles.sh -- find new RCS files in postgres tree
  4. #
  5.  
  6. if [ -z "$PGMASTERTREE" ]; then
  7.     MASTER=/usr/local/dev/postgres/mastertree
  8. else
  9.     MASTER=$PGMASTERTREE
  10. fi
  11.  
  12. SRCDIRS=`cat $1`
  13. OTHERS=`co -s -p $MASTER/newconf/dirs_other.mk`
  14.  
  15. SRCDIR=`basename $2`
  16. flags=$3
  17. TREE=$4
  18. TOP=$4/$SRCDIR
  19. if [ $5 ]
  20. then
  21.     checkout=true
  22.     OBJDIR=`basename $6`
  23. fi
  24.  
  25. cd $TREE
  26.  
  27. for i in $SRCDIRS
  28. do
  29.     cd $TREE/$SRCDIR/$i
  30.     if [ -d RCS ]
  31.     then
  32.         echo \*\*\* $SRCDIR/$i
  33.         f=`rcsnew $flags`
  34.         for j in $f
  35.         do
  36.             if [ -f $j ]
  37.             then
  38.                 echo \-\- $SRCDIR/$i/$j
  39.                 if [ $checkout ]
  40.                 then
  41.                     co -q $j
  42.                 fi
  43.             else
  44.                 echo \+\+ $SRCDIR/$i/$j NEW FILES
  45.                 if [ $checkout ]
  46.                 then
  47.                       co -q $j
  48.                       ln -s $TREE/$SRCDIR/$i/$j $TREE/$OBJDIR/$i
  49.                 fi
  50.             fi
  51.         done
  52.     fi
  53. done
  54.  
  55. for i in $OTHERS
  56. do
  57.     cd $TREE/$i
  58.     if [ -d RCS ]
  59.     then
  60.         echo \*\*\* $i
  61.         f=`rcsnew -n`
  62.         for j in $f
  63.         do
  64.             echo \-\- $i/$j
  65.             if [ $checkout ]
  66.             then
  67.                 co -q $j
  68.             fi
  69.         done
  70.     fi
  71. done
  72. exit 0
  73.